home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2006 December / PCWDEC06.iso / Software / Trial / Paint Shop Pro XI / Data1.cab / _0534047A0ECA45FE8829E4349A6D4EB3 < prev    next >
Encoding:
Text File  |  2006-08-04  |  1003 b   |  24 lines

  1. from PSPApp import *
  2.  
  3. def ScriptProperties():
  4.     return {
  5.         'Author': u'Corel Corporation',
  6.         'Copyright': u'Copyright (c) 2002-2006 Corel Corporation. All rights reserved.',
  7.         'Description': "Emulate the Corel behavior of toggling from the current tool to the selection tool.",
  8.         'Host': u'Paint Shop Pro',
  9.         'Host Version': u'8.00'
  10.         }
  11.  
  12. def Do(Environment):
  13.     # get the name of the current tool.   Do this by calling SetTool but
  14.     # specifying an empty string for the new tool name.  This returns the
  15.     # current tool name without changing tools
  16.     CurrentTool = App.Do( Environment, 'SelectTool', { 'Tool': '' } )
  17.   
  18.     if CurrentTool == 'FreehandSelection':
  19.         # we are on the freehand tool, select the previous tool
  20.         App.Do( Environment, 'SelectPreviousTool' )
  21.     else:
  22.         # not on the freehand tool, go to it
  23.         App.Do( Environment, 'SelectTool', { 'Tool':'FreehandSelection' } )
  24.